package com.syan.learn.optimization.ch04.future;

public class RealData implements Data {

	protected final String result;

	public RealData(String para) {
		StringBuffer buffer = new StringBuffer();
		for (int i = 0; i < 10; i++) {
			buffer.append(para);
			try {
				Thread.sleep(100);
			} catch (Exception e) {
				// TODO: handle exception
			}
		}
		result = buffer.toString();
	}

	@Override
	public String getResult() {
		return result;
	}

}
